Skip to content

Conversation

gnprice
Copy link
Member

@gnprice gnprice commented Sep 26, 2025

The fmt tool from GNU coreutils is very simple, and doesn't have the needed configuration knobs to be able to handle the nested lists that we now routinely use in changelog entries; it ends up mangling them.

As a result, for many recent releases I've been doing the reformatting semi-manually, in Emacs: M-q to unwrap lines (after setting the text width to 999), and then a regexp find-and-replace to turn references #1234 into #F1234.

It seems to be somewhat annoying to get Emacs to operate within a shell pipeline. But it's less annoying for Vim; and Vim's gq works just as well as Emacs's M-q, given the right config. So use that.

The `fmt` tool from GNU coreutils is very simple, and doesn't have the
needed configuration knobs to be able to handle the nested lists that
we now routinely use in changelog entries; it ends up mangling them.

As a result, for many recent releases I've been doing the reformatting
semi-manually, in Emacs: M-q to unwrap lines (after setting the text
width to 999), and then a regexp find-and-replace to turn references
`zulip#1234` into `#F1234`.

It seems to be somewhat annoying to get Emacs to operate within a
shell pipeline.  But it's less annoying for Vim; and Vim's `gq`
works just as well as Emacs's M-q, given the right config.
So use that.
@gnprice gnprice added the maintainer review PR ready for review by Zulip maintainers label Sep 26, 2025
Copy link
Member

@rajveermalviya rajveermalviya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @gnprice! Sorry for delayed review on this.

LGTM.

# (Emacs works equally well, interactively; but seems more annoying
# to integrate into a CLI pipeline.)

local vim_markdown_settings=/usr/share/vim/vim90/ftplugin/markdown.vim
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On macOS 26.0.1, with vim 9.1, the path for this file is /usr/share/vim/vim91/ftplugin/markdown.vim.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer review PR ready for review by Zulip maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants